from my_const import *
from fund.strategy.strategy_by_dca import daily_invest
from fund.strategy.strategy_by_drop import strategy_based_on_drop
from fund.strategy.strategy_by_ma import strategy_based_on_moving_average


STRATEGY_MAP = {
    DCA: {
        ENDPOINT: daily_invest,
        DESC: "每日定投",
        DEFAULT_PARAMS: {"money": 100},  # 定投策略固定参数：每日投100元
        DYNAMIC_PARAMS: None  # 无动态参数（仅1组策略）
    },
    MA: {
        ENDPOINT: strategy_based_on_moving_average,
        DESC: "基于均值",
        DEFAULT_PARAMS: {"higher_money": 0, "lower_money": 200},  # 均值策略固定参数：高于均值买0元，低于买200元
        DYNAMIC_PARAMS: {"ma_range": [30, 60, 90]}  # 动态参数：需要测试的均值天数（生成3组策略）
    },
    DROP: {
        ENDPOINT: strategy_based_on_drop,
        DESC: "基于跌幅",
        DEFAULT_PARAMS: {"money": 200},  # 跌幅策略固定参数：每次买200元
        DYNAMIC_PARAMS: None  # 无动态参数（仅1组策略）
    }
}

if __name__ == '__main__':
    print(os.getcwd())
